home *** CD-ROM | disk | FTP | other *** search
- #include <exec/exec.h>
- #include <stdlib.h>
- #include <stdio.h>
-
- #include "work:romconf/doorheader.h"
-
-
- #define NOCHECK 1
- #define GOODFILE 0
- #define BADFILE -1
- #define INTERNALCHECK 2
- char temp[100];
- char FileName[100];
- #define sm sendmessage
- #define gu getuserstring
-
- void end(void);
- void LastCommand(void);
- int mynode;
- main(int argc,char *argv[])
- {
- register int i;
- if(argc!=2)
- {
- printf("FileCheck version 1.0 demo, by ByteMaster\n");
- printf("/X 2.30+ SYS.CMD\n");
- printf("\n");
- exit(0);
- }
-
- Register(argv[1][0]-'0');
- mynode=argv[1][0]-'0';
- gu(temp,BB_MAINLINE);
-
- i=0;
- while(temp[i]!='\0' && temp[i]!=' ') i++;
- sm("",1);
- sprintf(FileName,"FILECHECK v1.0: Checking %s",FilePart(&temp[i+1]));
- sm(FileName,1);
-
- if(mynode!=5)
- {
- sm("Releasing File for Internal BBS FileCheck routines",1);
-
- PutInfo(INTERNALCHECK,DT_GOODFILE);
- }
- else
- {
- PutInfo(GOODFILE,DT_GOODFILE);
- }
- ShutDown();
- end();
- }
-
- void LastCommand(void)
- {
- sm("",1);
- }
-
- void end(void)
- {
- exit(0);
- }